2016-05-10 14 views
0

TL; DR
エラーがエンコードされていないURL内のスペースです。彼らの側に支店みんなで固定されます iOSのBranch.ioでapplicationDidBecomeActiveがクラッシュする[FIXED]


は、私は、iOS SDKを統合し、ガイドで説明したように、ユニバーサルリンクのためのすべてのセットアップをしました。私はすべてが適切に設定されている(またはそう思われる)ので、リンクを開くとアプリケーションが表示されます。 しかし、この問題は、逆方向リンク機能に関連していないようです。

ステップ:

1.-オープンアプリ
2.-バックホームスクリーンに移動します(アプリを閉じないでください)
3.-オープンアプリを再び
4.- CRASH

指定されたURLはサポートされていません。 (:114 BNCStrongMatchHelper.m):
UIViewController * safController = [[SFSafariViewControllerClass alloc] initWithURL:[NSURL URLWithString:urlString]];

しかし、この時点でurlStringがhttpsリンクでのみHTTPおよびHTTPS URLはラインクラッシュがある

をサポートしています。

さらに詳細:あなたのInfo.plistファイルにこれを追加すること

Fatal Exception: NSInvalidArgumentException 
    0 CoreFoundation 0x1819bae38 __exceptionPreprocess 
    1 libobjc.A.dylib 0x18101ff80 objc_exception_throw 
    2 CoreFoundation 0x1819bad80 -[NSException initWithCoder:] 
    3 SafariServices 0x18dd9e3fc -[SFSafariViewController initWithURL:entersReaderIfAvailable:] 
    4 [myapp] 0x1002acc00 -[BNCStrongMatchHelper presentSafariVCWithBranchKey:] (BNCStrongMatchHelper.m:114) 
    5 [myapp] 0x1002ac590 -[BNCStrongMatchHelper createStrongMatchWithBranchKey:] (BNCStrongMatchHelper.m:66) 
    6 [myapp] 0x1002bdef0 -[Branch registerInstallOrOpen:] (Branch.m:1369) 
    7 [myapp] 0x1002bdd74 -[Branch initializeSession] (Branch.m:1354) 
    8 [myapp] 0x1002bd914 -[Branch initUserSessionAndCallCallback:] (Branch.m:1328) 
    9 [myapp] 0x1002bc104 -[Branch applicationDidBecomeActive] (Branch.m:1203) 
    10 CoreFoundation 0x18195ceac __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ 
    11 CoreFoundation 0x18195c6cc _CFXRegistrationPost 
    12 CoreFoundation 0x18195c44c ___CFXNotificationPost_block_invoke 
    13 CoreFoundation 0x1819c5494 -[_CFXNotificationRegistrar find:object:observer:enumerator:] 
    14 CoreFoundation 0x18189a788 _CFXNotificationPost 
    15 Foundation 0x1822a289c -[NSNotificationCenter postNotificationName:object:userInfo:] 
    16 UIKit 0x186b8e014 -[UIApplication _stopDeactivatingForReason:] 
    17 UIKit 0x186dacdc4 __62-[UIApplication _sceneSettingsPostLifecycleEventDiffInspector]_block_invoke1180 
    18 FrontBoardServices 0x18334c7b4 __52-[FBSSettingsDiffInspector inspectDiff:withContext:]_block_invoke27 
    19 Foundation 0x1823517e8 __NSIndexSetEnumerate 
    20 BaseBoard 0x1832d4728 -[BSSettingsDiff inspectChangesWithBlock:] 
    21 FrontBoardServices 0x183347d94 -[FBSSettingsDiff inspectOtherChangesWithBlock:] 
    22 FrontBoardServices 0x18334c58c -[FBSSettingsDiffInspector inspectDiff:withContext:] 
    23 UIKit 0x186dad648 __70-[UIApplication scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke 
    24 UIKit 0x186dad2a4 -[UIApplication scene:didUpdateWithDiff:transitionContext:completion:] 
    25 FrontBoardServices 0x18335b7ac __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ 
    26 FrontBoardServices 0x18335b618 -[FBSSerialQueue _performNext] 
    27 FrontBoardServices 0x18335b9c8 -[FBSSerialQueue _performNextFromRunLoopSource] 
    28 CoreFoundation 0x181971124 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ 
    29 CoreFoundation 0x181970bb8 __CFRunLoopDoSources0 
    30 CoreFoundation 0x18196e8b8 __CFRunLoopRun 
    31 CoreFoundation 0x181898d10 CFRunLoopRunSpecific 
    32 GraphicsServices 0x183180088 GSEventRunModal 
    33 UIKit 0x186b6df70 UIApplicationMain 
    34 [myapp] 0x1001b6984 main (main.m:16) 
    35 libdispatch.dylib 0x1814368b8 (Missing) 

答えて

1

アレックス:いくつかのデバッグした後、我々はこれを決定しましたurlStringのスペースのため(アプリのバージョン番号から渡されました)。このスペースを削除するとクラッシュが解決されました。

ブランチの端からのより永続的な解決策も、現在行われています。

+0

ありがとうございます!いつものように素晴らしいサポート –

+0

私の喜びです!次の訪問者にとって便利だと感じたらこの回答に印を付けてください:) –

0

試してみてください。アップデートでBranch.ioから

<key>NSAppTransportSecurity</key> 
<dict> 
    <key>NSAllowsArbitraryLoads</key> 
    <true/> 
</dict> 
+0

これは既に設定されています:( –

関連する問題