viezel / TiSocial.Framework

iOS6+ Social.Framework. Appcelerator apps are able to share content to Facebook and Twitter.
MIT License
257 stars 102 forks source link

Titanium 3.4.0 RC / xcode 6 / iOS8 - Social.isRequestTwitterSupported() crashes app #95

Open peteclark3 opened 10 years ago

peteclark3 commented 10 years ago

Let me know if you need more info. Workaround currently for me was just to remove this code (from the sample code).. and it worked

/*
         * if (Social.isRequestTwitterSupported()) {//min iOS6 required
            var accounts = [];
            Social.addEventListener("accountList", function(e) {
                Ti.API.info("Accounts:");
                accounts = e.accounts;
                //accounts
                Ti.API.info(accounts);
            });

            Social.twitterAccountList();
        }
        */
matthewwardle commented 10 years ago

This also crashes the app for me

LaunchServices: invalidationHandler called

I can provide full crash report if required.

ludolphus commented 10 years ago

Using Titanium 3.2.2 / xcode 5 / iOS 8 here same issue. I narrowed it down to the Social.twitterAccountList() call. Weird issue because it still crashes the app even when removing all code from the twitterAccountList method (in ObjC).

Tried adding a new dummy method without code, calling that also crashes the app.

Service exited due to signal: Segmentation fault: 11

Sounds like a memory (de)allocation issue somewhere.

oisu commented 10 years ago

I'm using Titanium 3.4.0 Beta / xcode 6.0.1 / iOS 8 and also getting bothered by the same issue.

I hope someone specify the problem and fix it soon...

alperdincer commented 10 years ago

Hi, I worked on the module last night and find the solution as explained in pull request : https://github.com/viezel/TiSocial.Framework/pull/100

You can create your own module with the change, or repo authors will create a new version to fix the problem.

Best.

ludolphus commented 10 years ago

Apparently this is not related to just 3.4.x SDKs, I'm still using 3.2.2 for an app and the fix works there too. Thanks @alperdincer !

amigoni commented 10 years ago

Same here 3.4 ios8 xcode 6 crashes

amigoni commented 10 years ago

Anyone know how to build a version with the latest changes? I get these messages no matter what version of the SDK i change in the Titanium.xconfig

File "build.py", line 216, in build_module(manifest,config) File "build.py", line 161, in build_module from tools import ensure_dev_path ImportError: No module named tools

harrythree commented 10 years ago

@amigoni I changed the TITANIUM_SDK path in the titanium.xcconfig file and then I was able to run ./build.py. More info here...

https://developer.appcelerator.com/question/136061/cannot-create-an-iphone-module-since-upgrading-to-studio-20-og-sdk-201ga2

amigoni commented 10 years ago

@harrythree Thanks for the tip, but no luck.

harrythree commented 10 years ago

@amigoni Maybe try changing the TITANIUM_SDK_VERSION to something newer. Doesn't seem like it would compile if you don't have the Ti version it has set by default (which is pretty old. 2.1.4.GA).

amigoni commented 10 years ago

Yeah. Did that already before your suggestion. I have 3.4.0.GA which is the latest that I have installed. Double checked that it exists.

harrythree commented 10 years ago

These are the two lines I changed to get it to work in titanium.xcconfig.

  1. TITANIUM_SDK_VERSION = 3.4.0.GA
  2. TITANIUM_SDK = /Users//Library/Application Support/Titanium/mobilesdk/osx/$(TITANIUM_SDK_VERSION)

And of course make sure you change directories in terminal to the tisocial.framework folder you got from here and run ./build.py

harrythree commented 10 years ago

Oops the mark down parsed 2. and left out some stuff. Should be... TITANIUM_SDK = /Users/your_computer_name/Library/Application Support/Titanium/mobilesdk/osx/$(TITANIUM_SDK_VERSION)

amigoni commented 10 years ago

Ok some progress but using this.

TITANIUM_SDK = /Library/Application Support/Titanium/mobilesdk/osx/$(TITANIUM_SDK_VERSION)

but now I get this.

In file included from /Users/Leonardo/Downloads/TiSocial.Framework-master 2/Classes/NappCustomActivity.m:9:

_/Users/Leonardo/Downloads/TiSocial.Framework-master 2/Classes/NappCustomActivity.h:8:9: _fatal error: 'TiModule.h' file not found

import "TiModule.h"

1 error generated.

* BUILD FAILED *

The following build commands failed:

CompileC build/social.build/Release-iphoneos/social.build/Objects-normal/armv7/DkNappSocialModule.o Classes/DkNappSocialModule.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler

CompileC build/social.build/Release-iphoneos/social.build/Objects-normal/armv7/NappCustomActivity.o Classes/NappCustomActivity.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler

(2 failures)

xcodebuild failed

Thanks for your patience.

Leo Amigoni

On Thu, Oct 2, 2014 at 9:28 AM, Harry Baldwin notifications@github.com wrote:

Oops the mark down parsed 2. and left out some stuff. Should be... TITANIUM_SDK = /Users/your_computer_name/Library/Application Support/Titanium/mobilesdk/osx/$(TITANIUM_SDK_VERSION)

— Reply to this email directly or view it on GitHub https://github.com/viezel/TiSocial.Framework/issues/95#issuecomment-57593186 .

harrythree commented 10 years ago

That seems like it doesn't know where the SDK is located. Send me an email (harrythree@gmail.com) and I'll send over my build of the module in the morning.

bcpi commented 10 years ago

Like @amigoni, I also have Ti installed in /Library/Application Support/Titanium and I also get the #import "TiModule.h" problem.

No issues with any of the other modules I use, and have updated to 3.4.0. Does anyone know the fix?

alexshive commented 10 years ago

@amigoni Open up the social.xcodeproj and under Build Settings > User-Defined, update the TITANIUM_SDK_VERSION to 3.4.0.GA, it's at 3.1.1 currently.