nativescript-fabric icon indicating copy to clipboard operation
nativescript-fabric copied to clipboard

Fabric API key still required in info.plist

Open surdu opened this issue 7 years ago • 11 comments

The documentation mentions the configuration for iOS is not needed anymore, but when building for iOS I got an error that the Fabric key was missing from info.plist dict.

I managed to find the needed info.plist code in an older version of the readme.

I'm using the @next version.

surdu avatar May 10 '18 23:05 surdu

can link the documentation where the API key isn't needed anymore? cannot find it

hypery2k avatar May 15 '18 03:05 hypery2k

https://github.com/hypery2k/nativescript-fabric#ios

whereas that section should still read:

https://github.com/hypery2k/nativescript-fabric/tree/e53eafc3928527a40564f93032e412377acfe15b#ios

surdu avatar May 15 '18 07:05 surdu

it basically means you don't have to add it manually.

hypery2k avatar May 15 '18 07:05 hypery2k

This is what I'm trying to tell you: you have to add it manually, otherwise you get the following error when the application starts:

2018-05-15 11:33:26.942824+0300  localhost capangoseeker[32602]: (CoreFoundation) *** Terminating app due to uncaught exception 'FAB
Exception', reason: '[Fabric] Value of Info.plist key "Fabric" must be a NSDictionary.'
*** First throw call stack:
(
        0   CoreFoundation                      0x0000000117e7612b __exceptionPreprocess + 171
        1   libobjc.A.dylib                     0x0000000116dc0f41 objc_exception_throw + 48
        2   CoreFoundation                      0x0000000117eeb245 +[NSException raise:format:] + 197
        3   capangoseeker                       0x000000010fe254f4 -[Fabric validFabricConfigFromInfoPlist:] + 353

surdu avatar May 15 '18 08:05 surdu

could you try with 2.0.2?

hypery2k avatar May 17 '18 05:05 hypery2k

Looks the same with 2.0.2. Just tested. Even after manually adding it in the Info.plist, I get the following error during build:

2018-05-22 19:07:43.048 uploadDSYM[95656:2021109] Fabric.framework/run 1.7.0 (208) error: Fabric: Configuration Issue Fabric API key not valid. Your Fabric run script build phase should contain your API key: ./Fabric.framework/run INSERT_YOUR_API_KEY INSERT_YOUR_BUILD_SECRET

etabakov avatar May 22 '18 15:05 etabakov

that's strange. CI is working so far even for iOS. Can you share your project? Which NativeScript version you're using?

hypery2k avatar Jun 18 '18 02:06 hypery2k

I have the same issue and tried adding the key to the plist file but received the same error as @etabakov. Interesting that the error shows is looking for the build phase in Fabric.framework/run but the hook has it writing to Fabric/run. I tried changing the hook to write to Fabric.framework/run but this didn't work either.

Xcode: 9.4 Nativescript: 4.1.0 tns-core-modules: 4.0.1 tns-ios: 4.0.1

stevegardnersa avatar Jun 29 '18 02:06 stevegardnersa

I can confirm same error happens for me.

Xcode 9.4 Nativescript 4.1 tns-core-modules 4.1 tns-ios 4.1.1

fthuin avatar Jul 26 '18 08:07 fthuin

Hi guys, I also needed to add to Info.plist: APIKey <YOUR KEY HERE> Kits KitInfo KitName Answers KitInfo KitName Crashlytics

Now it is working..

Cheers, Alex

maatthc avatar Aug 20 '18 09:08 maatthc

Same here. I had to add this to my Info.plist or the app would crash after starting.

  <key>Fabric</key>
  <dict>
    <key>APIKey</key>
    <string>{{API_KEY_HERE}}</string>
    <key>Kits</key>
    <array>
      <dict>
        <key>KitInfo</key>
        <dict/>
        <key>KitName</key>
        <string>Crashlytics</string>
      </dict>
    </array>
  </dict>

cmckni3 avatar Nov 27 '18 05:11 cmckni3