Start with these instructions:
1. Add the associated domains capability and download and update provision profile:
2. Based on the NFCExtra example. Add this line:
#Entitlement: <key>com.apple.developer.associated-domains</key><array><string>applinks:b4x.com</string></array>
3. Create an NFC tag with URL data (you can use this:
https://www.b4x.com/android/forum/threads/nfcex-class-write-ndef-tags.110726/#post-692860). Set the link to
https://www.b4x.com
4. Add this at the end of the main module:
#if OBJC
@end
@implementation B4IAppDelegate (nfc)
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity
restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> *restorableObjects))restorationHandler {
NSLog(@"continueUserActivity");
if (userActivity.activityType != NSUserActivityTypeBrowsingWeb)
return false;
B4I* bi = [b4i_main new].bi;
[bi raiseEvent:nil event:@"application_nfc:" params:@[userActivity.ndefMessagePayload]];
return true;
}
#End If
5. Run your app in debug mode, move it to the background and try to scan. Do you see the 'continueUserActivity' message in the logs?