Showing posts with label Objective-C. Show all posts
Showing posts with label Objective-C. Show all posts

Thursday, May 28, 2015

[Swift] Hello World Primus with Swift via ActionHeroJS

Pretty much same as Objective-C implement nothing to special, just this fancy block...
class Block<T>  {
    let f : T
    init (_ f: T){ self.f = f }
    var casted: AnyObject { get { return unsafeBitCast(f, AnyObject.self) } }
}
Which I can't find shorter way yet


Happy Coding!



Wednesday, May 27, 2015

[NodeJS] Hello World Primus with Objective-C via ActionHeroJS

From my previous post about Hapi and Faye I did mention about Hello World from Objective-C, So here it is! :D

I'm using Primus Objective-C to send data to ActionHeroJS at this time. Next stop is Swift implement ;)

TL;DR : https://github.com/katopz/primus-objc-helloworld

Happy Coding!

Monday, April 7, 2014

[Objective-C] Meaning, My first attempt for native iOS app



After wrestling with plenty of nightmares , my first Objective-C iOS Application "Meaning" or "いみ" in Japanese language (in Thai is "ความหมาย") is finally finish and ready for sell! Yeah!

Features

  • Snap picture -> Highlight Words -> Translate/Search
  • Enter/Paste text from clipboard -> Translate/Search
  • Get location from picture and open it in map.
  • Share word and meaning to social network.
  • English/Japanese/Thai language supported.

Download

which is just $1.99 (for 1 year work!) or you can build your own app like this by pull all this together

Source Code

It could be more this and that which i mixed up and forget to put the link here, also my own helper that gathering from many random stackoverflow/gist which I will publish to Github later :)

Time elapsed (Working 1-2 hrs a day and some more on weekend)

  • Begin : July 2, 2013 
  • End : April 1, 2014
And again you can feed my cats by download this application or just here

Happy Coding! :D

Monday, February 10, 2014

[Xcode] Invalid Signature, Invalid Binary Nightmare!



At first I think I will add this to postmortem but it should be a huge list there lol, so i think i better separated this case here. It happen when you pass validation via Xcode and trying to distribute to app store...


Then shit happen when you got email eventually after submit your app to app store
Dear developer,
We have discovered one or more issues with your recent delivery for "Meaning". To process your delivery, the following issues must be corrected:
Invalid Signature - Make sure you have signed your application with a distribution certificate, not an ad hoc certificate or a development certificate. Verify that the code signing settings in Xcode are correct at the target level (which override any values at the project level). Additionally, make sure the bundle you are uploading was built using a Release target in Xcode, not a Simulator target. If you are certain your code signing settings are correct, choose "Clean All" in Xcode, delete the "build" directory in the Finder, and rebuild your release target.
Once these issues have been corrected, go to the Version Details page and click "Ready to Upload Binary." Continue through the submission process until the app status is "Waiting for Upload." You can then deliver the corrected binary.
Regards,
The App Store team
And appear "Invalid Binary" like this on itune connect...

Case # 1 : Invalid Signature

After delete/revoke all developer/distribute 10 times even start from scratch again and again, nothing work for me tho, i shouldn't that stupid and even i let Xcode is picking up signing certification itself but it still didn't get through so it shouldn't be the case.

Case # 2 : Invalid Binary

If you google for this mess you will plenty of solution on stackoverflow which none of them is working and here's (some of) my 21 times trying for a 2 months (each time required an hour upload time)...

And even worst my app name will expire at period of week that app store planning to close (21 Dec.), which mean if i can't upload it in time. My app name will be hand over to someone and i never get it back! and guess what? App store keep rejecting my app til last minute of that time and i did lost my app name (26 Dec.)

But after I try email and beg apple for mercy, they just gave me a 2nd chance to upload because it's not all my false and i did submit binary. then on 2 Jan. i can upload again.

(Nearly)All problem has solution :)

Now you should want to know what my problem is! The secret just reveal a second ago so i'm totally itchy to write it down...TADA...my problem for causing invalid binary is ExFAT which i use to write project in this ExFat drive so i can read/write assets between Windows and Mac (i'm using both OS on same PC), grhhhh here's conclusion...

Problem : Archiving and then distribute application with Xcode 5 to App Store on ExFAT drive will cause you Invalid Binary

Solution : Move project to normal Mac OS formatted drive and archive/distribute from that.

All this mess take me Dec 2013 -> Feb 2014 to figure this out and nearly give up while trying, Just hope this will save someone time.(And yes you can click any ads on my blog to cheers me up lol)

Happy Coding!