Giter Site home page Giter Site logo

Comments (24)

Sherlouk avatar Sherlouk commented on May 11, 2024 1

Created a very basic example over on my fork (here) of an iMessage extension.

I've downloaded your demo repository and it seems that it doesn't have the 'Embed Pods Frameworks' run script which is usually generated by CocoaPods - this would most likely explain the error (and when you add it, seems to work)

EDIT: I've created a pull request to your repository which is working for me (clean your workspace if you pull it down) link

from iglistkit.

ishabazz avatar ishabazz commented on May 11, 2024 1

Thanks @Sherlouk!

from iglistkit.

Sherlouk avatar Sherlouk commented on May 11, 2024 1

@rnystrom @ishabazz Flagging to be closed?

There's now an example in the pack, and the issue at hand was seemingly resolved.

from iglistkit.

jessesquires avatar jessesquires commented on May 11, 2024 1

πŸ‘

will re-open if needed

from iglistkit.

philosopherdog avatar philosopherdog commented on May 11, 2024 1

I'm still getting this warning intermittently. I'm using pods 1.6.1. Why is this happening and how do I fix it.

from iglistkit.

rnystrom avatar rnystrom commented on May 11, 2024

I've definitely seen this error before, but that was using a non-Swift library in a Swift app using Buck for dep management. Might be something similar though.

from iglistkit.

jessesquires avatar jessesquires commented on May 11, 2024

Not clear if this is:

  1. a bug in IGListKit
  2. a bug in CocoaPods
  3. an issue with project setup

from iglistkit.

rnystrom avatar rnystrom commented on May 11, 2024

Off the bat I get an Xcode warning in the sample project:

ld: warning: linking against a dylib which is not safe for use in application extensions: /Users/rnystrom/Library/Developer/Xcode/DerivedData/IGListStickerDemo-cherwvpgwwdqmjhkvyhkxnqnciyx/Build/Products/Debug-iphonesimulator/IGListKit/IGListKit.framework/IGListKit

Seeing the same error message as @ishabazz

dyld: Library not loaded: @rpath/IGListKit.framework/IGListKit
Referenced from: /Users/rnystrom/Library/Developer/CoreSimulator/Devices/68FD0653-60FD-438C-BF3E-C6753A5F683E/data/Containers/Bundle/Application/4EB30904-90A4-4E77-A205-B59794CA7312/IGListStickerDemo.app/PlugIns/MessagesExtension.appex/MessagesExtension
Reason: image not found

from iglistkit.

rnystrom avatar rnystrom commented on May 11, 2024

After $ pod install I see some weird CocoaPods warnings:

[!] The `IGListStickerDemo [Debug]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-IGListStickerDemo/Pods-IGListStickerDemo.debug.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The `IGListStickerDemo [Release]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-IGListStickerDemo/Pods-IGListStickerDemo.release.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

edit: I manually added IGListKit.framework to the message extension target, it failed to build. I deleted the framework and reran $ pod install then ran the app again (it was still installed) and everything worked. I saw the "Hello world" in the message app.

from iglistkit.

ishabazz avatar ishabazz commented on May 11, 2024

Ok. To recap, you removed it from the Podfile, ran pod install and manually installed the framework?

from iglistkit.

rnystrom avatar rnystrom commented on May 11, 2024

@ishabazz I actually didn't remove it from the Podfile at first, just added to Linked Libraries and Frameworks. Then I built, got compiler errors, removed the framework from Linked Libraries and Frameworks, then did $ pod install again. This definitely isn't the answer but might be a clue to what's going on.

from iglistkit.

ishabazz avatar ishabazz commented on May 11, 2024

I looked into that initial compiler warning and it leads here https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/ExtensionOverview.html#//apple_ref/doc/uid/TP40014214-CH2-SW6

from iglistkit.

rnystrom avatar rnystrom commented on May 11, 2024

Fixing the warning in #79

from iglistkit.

rnystrom avatar rnystrom commented on May 11, 2024

@ishabazz ok now I can't get it to happen at all anymore. I ran

$ pod deintegrate
$ rm -rf ~/Library/Developer/Xcode/DerivedData
$ pod install

It installs and runs on multiple simulators and device.

I believe my Podfile is unchanged from what you originally sent:

target 'IGListStickerDemo' do
  use_frameworks!
  pod 'IGListKit'
end

target 'MessagesExtension' do
  use_frameworks!
  pod 'IGListKit'
end

from iglistkit.

ishabazz avatar ishabazz commented on May 11, 2024

hmm...tried that but mine still crashes. Your Podifle is the same as mine

from iglistkit.

rnystrom avatar rnystrom commented on May 11, 2024

@ishabazz a couple other configs I tried that seemed to work:

  • Remove IGListKit from the main target since its empty
  • Remove use_frameworks!

from iglistkit.

ishabazz avatar ishabazz commented on May 11, 2024

Progress! I can get the demo project to run without crashing. I get a compiler error when trying "import IGListKit" though.

from iglistkit.

rnystrom avatar rnystrom commented on May 11, 2024

@ishabazz any update on this? Not really sure what to do here Β―_(ツ)_/Β―

from iglistkit.

ishabazz avatar ishabazz commented on May 11, 2024

Still a problem. Compiles fine until you try to import IGListKit, then doesn't compile and gives a "No such module 'IGListKit' found" Did it work for you?

from iglistkit.

jessesquires avatar jessesquires commented on May 11, 2024

Compiles fine until you try to import IGListKit, then doesn't compile and gives a "No such module 'IGListKit' found"

Hm... πŸ€” Sounds like this is probably a project setup issue... ?

from iglistkit.

Sherlouk avatar Sherlouk commented on May 11, 2024

@rnystrom Relating to my previous comment, how would you feel about adding extension examples into this repo? Happy to make modifications/make them more useful!

my fork contains an example for both a Today Extension and an iMessage Extension.

from iglistkit.

rnystrom avatar rnystrom commented on May 11, 2024

@Sherlouk yes yes yes yes yes! That would be amazing! Should we clean up and add your fork to the example or should we make something new?

from iglistkit.

ishabazz avatar ishabazz commented on May 11, 2024

By the way. When trying to submit the build to TestFlight I ran into this issue http://stackoverflow.com/questions/40005130/error-itms-90685-cfbundleidentifier-collision-there-is-more-than-one-bundle

Still working on a resolution

from iglistkit.

jessesquires avatar jessesquires commented on May 11, 2024

@ishabazz -- This should be fixed with CocoaPods 1.1

http://blog.cocoapods.org/CocoaPods-1.1.0/

from iglistkit.

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.