Giter VIP home page Giter VIP logo

Comments (19)

VishalBumpy avatar VishalBumpy commented on July 3, 2024 5

@nlutsenko this is happening again with xcode 8.2 with bolt 1.8.4 release. please help.

from bolts-objc.

ernestofndz avatar ernestofndz commented on July 3, 2024 3

In my case, the actual problem was that when we run pod install and one of our frameworks (the one that requires access to the FBSDK in this case) has the App Extensions enabled, it will set this as well by default enabled (when it shouldn't) in the dependency pods, causing the sharedApplication error.

To fix this, you can use the code that @theamorn shared, or you can try this manually, by simply going to your Pods project, and removing the App Extensions check of those pods that are giving problems.

from bolts-objc.

nlutsenko avatar nlutsenko commented on July 3, 2024

Hey @zhangao0086, it looks like we still need this for AppLinks code to work.
If you are using Cocoapods and don't really want/use AppLinks - you can use a subspec aka
add pod 'Bolts/Tasks' into your Podfile.

from bolts-objc.

zhangao0086 avatar zhangao0086 commented on July 3, 2024

@nlutsenko Thanks!
If it was a dependancy of one of my used pods... I don't have use Bolts directly... Any hint?

from bolts-objc.

nlutsenko avatar nlutsenko commented on July 3, 2024

@zhangao0086, which pod was that?
I can mark entire classes that are unavailable for extensions, that will eliminate this warning, but it will prevent you from using this code in App Extensions at all.

from bolts-objc.

uttamraj143 avatar uttamraj143 commented on July 3, 2024

These are the updated pod files
Using AFNetworking (2.5.4)
Using Bolts (1.5.0)
Installing FBSDKCoreKit (4.8.0)
Installing FBSDKLoginKit (4.8.0)
Using Facebook-iOS-SDK (3.24.1)
Using MBProgressHUD (0.9.1)
Installing Parse 1.8.1 (was 1.10.0)
Installing ParseFacebookUtilsV4 (1.8.1)
Installing ParseUI (1.1.6)
Using SDWebImage (3.7.3)

after installing pods I am getting error in Bolts that unknown type name NS_ASSUME_NONNULL_BEGIN in bolts and I am using Xcode 6.1.How do I fix this? thanks in advance

from bolts-objc.

nlutsenko avatar nlutsenko commented on July 3, 2024

Hey @uttamraj143, please upgrade to at least Xcode 6.3.2 - the issue is going to be automagically fixed.
For best support - I would recommend using the current latest release (7.2).

Just to give you a perspective - 6.1 was released on Oct 15, 2014, and due to the fact that there are a lot of new and amazing features that we want to support, like nullability annotations (exactly what you are running in) or ObjC generics - having backward compatibility with a release that is more than a year old would slow us down.

from bolts-objc.

uttamraj143 avatar uttamraj143 commented on July 3, 2024

thank you for your reply but I have used same pods files 10days back it was perfect due to over size of my app i had to uninstall pod files so I did it and tried to install it again this is the issue I am facing...any another resolution for this?

from bolts-objc.

nlutsenko avatar nlutsenko commented on July 3, 2024

Try using an old version of Bolts, say 1.3.0.
I would seriously recommend using the latest version of Xcode, since there is no compelling reason not to (other than you are using Swift 1.2, which still is supported in Xcode 6.4).

from bolts-objc.

uttamraj143 avatar uttamraj143 commented on July 3, 2024

Ok thank for your reply.I will upgrade my xcode to 7.2..However I tried Bolts 1.3.0 but still I had that issue.So I think it might be the issue with Xcode version..

from bolts-objc.

nlutsenko avatar nlutsenko commented on July 3, 2024

Hey guys, looks like this is resolved at this point.
Please comment or reopen and let me know if not.

from bolts-objc.

daniele99999999 avatar daniele99999999 commented on July 3, 2024

@nlutsenko same problem for me, exactly like @VishalBumpy. I can't switch to older version, because facebook sdk needs at least 1.7:

  • Bolts (~> 1.7) required by FBSDKCoreKit (4.19.0)

Someone knows even a dirty workaround?

from bolts-objc.

theamorn avatar theamorn commented on July 3, 2024

@daniele99999999 Here's the dirty workaround
https://github.com/AFNetworking/AFNetworking/issues/2119#issuecomment-92345504

put this code after your target in pod file, outside of target and add target.name that has a problem with sharedApplication

post_install do |installer_representation|
    installer_representation.pods_project.targets.each do |target|
        puts "=== #{target.name}"
        if target.name == "Bolts" || target.name == "FBSDKCoreKit" || target.name == "FBSDKLoginKit" ||  target.name == "FacebookCore"
            puts "Setting #{target.name} Macro AF_APP_EXTENSIONS"
            target.build_configurations.each do |config|
                config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'NO'
            end
        end
    end
end

not quite sure if anyone has better solution

from bolts-objc.

victorcechinel avatar victorcechinel commented on July 3, 2024

@nlutsenko this is happening again with xcode 8.2.1 with bolt 1.8.4 release. please help.

from bolts-objc.

tamoyal avatar tamoyal commented on July 3, 2024

also experiencing this

from bolts-objc.

bloemy7 avatar bloemy7 commented on July 3, 2024

I'm also experiencing this problem.

from bolts-objc.

baic989 avatar baic989 commented on July 3, 2024

@ernestofndz
That solution allows the app to build but produces

linking against a dylib which is not safe for use in application extensions

error which could cause app rejection from the AppStore if I'm not mistaken.
Any suggestions?

from bolts-objc.

ernestofndz avatar ernestofndz commented on July 3, 2024

Hey @baic989, did you make sure to have the Allow app extension API only enabled in your framework/extension? We are not getting that warning. From Apple documentation:

To configure an app extension target to use an embedded framework, set the target’s “Require Only App-Extension-Safe API” build setting to Yes. If you don’t, Xcode reminds you to do so by displaying the warning “linking against dylib not safe for use in application extensions”.

from bolts-objc.

baic989 avatar baic989 commented on July 3, 2024

Hey @ernestofndz, yeah it was me. I had the pod installed in the extension by mistake which then produced the warning.
Thanks!

from bolts-objc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.