Swiftpack.co - Package - namiml/nami-apple

Nami SDK logo

Nami SDK Platform Cocoapod Carthage compatible

Why Nami?

Nami is on a mission to help app developers make more money by providing you tools to successfully sell your apps, not your users.

With Nami you can focus on your core app experience, not integrating and testing StoreKit and building in-app purchase or subscription offer screens. Our platform moves the critical elements to the cloud so you can make changes without making app updates.

1. Create your Nami account

Get started now to create your free account.

2. Add your App to Nami

After creating your account, add your app to the Nami Control Center.

Watch a walkthrough video or read a step-by-step guide for adding your app.

3. Download the Nami Framework

Clone or download this repository!

Requirements

  • iOS 11+, iPadOS 13+
  • Built for Xcode 11, if you still use Xcode 10.3 use the framework located in Xcode10-3 folder.

4. Add the Nami Framework to your Xcode project

Using CocoaPods

Add the following line to your Podfile. See the example in this repo Podfile.example.

pod "Nami", "2.4.3"

Then run the command

pod install

Using Carthage

Temporarily removed Carthage support until XCFramework support is fully resolved.

Add Manually

After downloading the Nami framework from GitHub, move to your application Project settings page in Xcode, and go to the General tab. Scroll down until you can see the "Frameworks and Libraries" section, and drag Nami.xcframework from the finder into this area.

A dialog will come up to verify, opt to "copy" the framework into the project so that your application has a copy of the framework to check into source control.

When complete, you can verify the Nami framework has been added properly by adding import Nami to the AppDelegate.swift file and then compiling your project. If everything is configured properly, the app will build and link with the Nami library. If you receive errors, try cleaning the build folder or removing the Nami framework from your project and try re-adding it.

Make sure the option to "Embed and Sign" is chosen instead of just "Embed".

Note: Updating the Nami Framework

When a new version of the Nami framework is released, just drag it over your old Nami framework in your application project directory - make sure to select "replace" instead of "merge". After the framework has been copied over the old one, make sure to select "Clean Build Folder" in Xcode so it properly refreshes the binary from the framework.

5. Setup the Nami Framework in your App

In your application delegate, the Nami SDK is configured and passed your unique app ID, You can find the Nami App ID under the Developer tab of the Nami Control Center's App Settings section.

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {

  // Configure Nami
  Nami.shared.configure(appID: "YOUR_APP_ID_GOES_HERE")

  return true
}

It is recommended that you move the Nami setup code to its own method if you start adding other configuration calls (we'll cover these other possible calls later). Also if you have existing code in the didFinishLaunchingWithOptions method, please call the Nami configure method as soon as possible to help the system initialize quickly and be ready for purchases.

Try building again to make sure all is well, then you are set up and ready to move to the next step.

6. Add Products

Add your App Store in-app purchase products to the Nami platform to use them from your cloud-based paywalls.

Products are managed from the Nami Control Center > Products

Watch a walkthrough video or read a step-by-step guide for adding products.

7. Add Your First Cloud-Controlled Paywall

The Nami framework supplies the views and view controllers you need to offer your products to your users. Since these Nami-powered screens are managed in the cloud, you can make changes without app updates.

Paywalls are managed from Nami Control Center > Paywalls

Learn more about adding a paywall.

8. Create a Campaign

How and when you present paywalls to your users are governed by business rules specified in a campaign.

Campaigns are managed from Nami Control Center > Campaigns

Learn more about creating a campaign.

Take your campaign live and you will see your paywall presented once business rule conditions are met.

Next Steps: Dive Into Additional Functionality

For more details on using the SDK, check out our help documentation at https://docs.namiml.com/.

Github

link
Stars: 32

Dependencies

Used By

Total: 0

Releases

v2.4.3 -

  • Expired purchases often get stuck in Apple's sandbox and mess up testing. We now ensure those get cleared out for you so you don't have to worry about it.

v2.4.2 -

  • Adjust featured item spacing on Nami paywalls.

v2.4.1 -

  • Fixed issue with background calls to Nami on app close sometimes stalling.

v2.4.0 -

  • New styling options for Nami No-Code paywalls.
  • Improved Nami paywall design.
  • Improved logging around purchase handling.
  • If paywall auto-raise is set to every session, first app launch will raise paywall.
  • Various stability improvements.

v2.3.2 -

  • Grant temporary entitlement immediately on purchase until validation of purchase completes.

v2.3.1 -

  • purchasesChangedHandler no longer called for entitlement changes. Please use NamiEntilementManager.entitlementsChangedHandler instead.

v2.3.0 -

  • Blocking paywalls now cannot be closed by swiping down, you must click the button.
  • Added NamiPaywallManager applicationBlockingPaywallClosedHandler call for custom handling of blocking paywalls.
  • Added NamiEntitlementManager entitlementsChangedHandler for reacting to changes to entitlements.
  • bypassStore setting now only located in NamiConfig, cannot be changed through NamiPurchaseManager.
  • Internal improvements to reduce SDK network call volume.

v2.2.2 -

  • Fix for display of multi-month products in SDK generated paywall.
  • Removed built-in image reference from SDK paywall template.

v2.2.1 -

  • Internal improvements

v2.2.0 -

  • bypassStore no longer enabled by default in the simulator
  • Added consumptionCount to Consumable NamiPurchase objects. Count is increased each time a consumable SKU is consumed via call to consumePurchasedSKU.
  • Consumable purchases now remain in Nami SDK after consumption, so you can check to see if anyone has purchased them in the past.
  • SDK logs now work with console.app on MacOS Catalina.
  • Added call NamiPaywallManager.dismissNamiPaywallIfOpen to allow for presenting post-purchase messages that ensure they always appear after the Nami paywall has been dismissed.

v2.1.1 -

v2.1.1

  • You are now able to specify any combination of parameters for a NamiEntitlementSetter.
  • Improvements to how entitlements work with bypass store mode
  • Internal Improvements to make API calls more efficient

v2.1.0 -

  • Simplified purchase state enumeration to just have one Purchased state, use Entitlements to verify validity of current purchases.
  • Further improvements to StoreKit transaction processing.
  • Added paywall lifecycle notifications, so an application can react to a paywall raising, and being dismissed either with or without a purchase being made.
  • Added ability to disable final "Purchase Complete" dialog if desired.
  • Other internal improvements.

v2.0.14 -

  • Framework built with Xcode 11.13.1, so you can use either with current Catalina Xcode, or pre-Catalina Xcode.
  • Internal improvements to Nami API calls.

v2.0.13 -

  • Improvements to processing of Apple Sandbox transactions when the sandbox does not behave as expected.
  • Improvements to calls to Nami APIs.
  • Support for ordering SKUs on paywalls.

v2.0.12 -

  • Improvements to handling cross-platform and cross-device entitlements.
  • Improved robustness around calls for Nami data collection.
  • Added detailed logging around StoreKit purchase process at DEBUG logging level
  • Added a timeout to purchase transactions in the Apple Sandbox to deal with reliability issues where purchases often get stuck without completing.
  • Improvements to transaction observations in insights mode.

v2.0.11 -

  • Improvements to restoring purchases.

v2.0.10 -

  • Internal improvements.

v2.0.9 -

  • Update entitlements after setExternalIdentifier is called.
  • Activates the purchase handler callback when entitlements received from the Nami platform change.
  • Added lifecycle notifications around Nami paywall raising, closing with no purchase, and closing after purchase completes.
  • Internal reliability improvements.

v2.0.8 -

  • Internal fix for storing entitlements.

v2.0.7 -

  • Improved processing of StoreKit transactions related to repeated purchase attempts.
  • Improved handling of cross-device and cross-platform entitlements and external ids.
  • Improved handling of switches between AppPlatformIDs
  • Added additional logging around StoreKit transaction processing.

v2.0.6 -

  • Improve messages displayed during purchase process for one time purchases and subscriptions.

v2.0.5 -

  • Changes to ML data sent to Nami.
  • Fix for Entitlements being reset and sent to Nami.
  • Improvements to reliability when switching between App Platform IDs.

V2.0.4 -

  • Improved reliability around sending external identifiers to Nami server.

v2.0.3 -

  • Added consumePurchasedSKU to NamiPurchaseManager

v2.0.2 -

  • bypassStore now allows you to test purchase flows for products that are not setup on App Store Connect.
  • Added public access to NamiEntitlement properties.
  • Improvements to internal API calls.

v2.0.1 -

  • Send ML and core content and core action data in all app environments.
  • Added a developmentMode flag to NamiConfiguration to move all API calls out of the background.

v2.0.0 -

Nami has deprecated all v1.x.x versions of the SDK. Please only use v2.0.0+ for compatibility with the Nami platform.

For more details on new features, please visit https://docs.namiml.com.

  • Major refactor of the codebase to reduce SDK size and amount of network traffic generated by the SDK.
  • Introduced support for apps to be cross-platform.
  • Added the concept of entitlements and NamiEntitlementManager to work with entitlement objects.
  • Added NamiPurchaseManager to simplify working with purchase flows.
  • Greatly improved in-XCode documentation for SDK methods.
  • New passive mode - get data, insights, and machine learning models without using Nami's capabilities to manage your in-app purchase process.
  • Added external identifiers to help link devices to a customer profile.
  • Greatly simplified Nami SDK setup process as well as introduced a new NamiConfiguration object.
  • New detailed logging in XCode, use logLevel in NamiConfiguration to control how much logging you see from the SDK.
  • All calls are now static instead of shared.
  • We now only support XCFramework, XCode 11+, and CocoaPods 1.9+.
  • Carthage support dropped until support for XCFramework files becomes available.

v1.11.0 -

  • Added helper methods for finding original application purchase version, and version comparison.
  • NamiReceiptWrapper now provides visibility to full Apple return dictionary from verifyReceipt call.

v1.10.1 -

  • Added extra guard code and logging around Nami Profile.

v1.10.0 -

  • Stability fixes around calls for Nami session.
  • Improved support for React Native Bridge
  • Added fetchCustomPaywallMetaForDeveloperID() call to get paywall definitions for alternate paywalls.
  • Made presentNamiPaywall() public so that developers could make use of the internal Nami paywall through a custom paywall meta definition.