chameleon icon indicating copy to clipboard operation
chameleon copied to clipboard

Add Chameleon to app extension

Open chika-kasymov opened this issue 9 years ago • 8 comments

Hello! I have problem after adding Chameleon with Cocoapods to keyboard app extension. When I compile Xcode project, there are errors like 'sharedApplication' is unavailable: not available on iOS (App Extension). I installed PureLayout and solved this problem with code on repo's wiki:

post_install do |installer|
        # NOTE: If you are using a CocoaPods version prior to 0.38, replace `pods_project` with `project` on the below line
        installer.pods_project.targets.each do |target|
            if target.name.end_with? "PureLayout"
                target.build_configurations.each do |build_configuration|
                    if build_configuration.build_settings['APPLICATION_EXTENSION_API_ONLY'] == 'YES'
                        build_configuration.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = ['$(inherited)', 'PURELAYOUT_APP_EXTENSIONS=1']
                    end
                end
            end
        end
    end

Is it possible to solve problem with similar code snippet?

chika-kasymov avatar Dec 26 '15 04:12 chika-kasymov

Let me take a look, and I'll get back to you on this. Thanks for bringing it up!

vicc avatar Jan 07 '16 01:01 vicc

I would also like to know the feasibility of using Chameleon on app extensions. Currently trying to use it for an Apple Watch extension and getting a Module file was created for incompatible target i386-apple-ios8.0 error

im-jersh avatar Apr 15 '16 04:04 im-jersh

Haven't had time to look at it, but will make it happen this weekend.

vicc avatar Sep 15 '16 08:09 vicc

@oriyentel You can now use Chameleon in your app extensions. Check out the app-extension branch.

@bre7 Feel free to look it over to make sure I didn't make any dangerous changes to the .swift files. I did remove several shorthand methods. Once you've made sure, I can merge it into the master branch.

vicc avatar Sep 17 '16 11:09 vicc

I can't use this, as I'm using the swift-3 branch in my main app.

I get this from CocoaPods:

[!] There are multiple dependencies with different sources for ChameleonFramework in Podfile:

  • ChameleonFramework (from https://github.com/ViccAlexander/Chameleon, branch swift3)
  • ChameleonFramework (from https://github.com/ViccAlexander/Chameleon, branch app-extension)

Urkman avatar Sep 30 '16 07:09 Urkman

Any chance we can get this updated for swift 3? I'd like to test it out.

sirnacnud avatar Nov 25 '16 22:11 sirnacnud

Any update to this? Any chance of getting this merged in?

cerupcat avatar Oct 26 '17 23:10 cerupcat

+1 I've been waiting for this to get merged for ~1y @ViccAlexander @bre7

itsjustcon avatar Nov 10 '17 08:11 itsjustcon