Of British-English origin, the phrase (as) sure as God made little apples means certainly, definitely; without a doubt.
These are, in chronological order, the earliest occurrences of this phrase that I have found:
1– : From Eloise de Montblanc (London: Printed for William Lane, 1796), a novel sometimes attributed to Lady Mary C—r, a young lady aged seventeen:
“Here’s our Bridget; why, lord, I remember her a little bit of a ragged girl, about the street, with hardly a shoe or stocking to her foot, and all by my lady’s bounty she is become what she is; why, and now, since she has been to live in your outlandish places, she wont [sic] hardly speak to me. Last night, when I went into the servants’-hall, to welcome her, why, she looked at one as if one wasn’t flesh and blood like herself; and there she sat conversing with the French valet in your foreign tongues. I dare say her betters won’t treat me in that way. There’s my lady, as sure as God made little apples, she’ll visit the lodge to-day, and inquire as freely after my wife and children as if they were her equals.”
2-: From the account of a court case, published in The Leicester Chronicle: Or, Commercial and Agricultural Advertiser (Leicester, Leicestershire, England) of Saturday 30th November 1839:
The Bench ordered the court to be cleared, and consulted some time, after which prosecutor was again examined as to the identity of the prisoner, and asked whether he might not be mistaken, when he made use of the following singular expression:—I’m as sure that’s the man as I am that God made little apples.
3-: From the account of a court case, published in The English Chronicle and Whitehall Evening Post (London, England) of Thursday 5th December 1839:
“Your reverences’ worship, twa’s all count ov a worked collar that I kem by, thro’ a great chance, indeed, and this girl wanted id to show off in a jig-house. ‘You won’t give id, Mrs. Ryan,’ says she. ‘Pon me word I jest won’t, Miss O’Regan,’ says I. ‘I’ll be up to you, so sure as God made little apples,’ says she.”
4-: From The Spitfire, A Tale of the Sea (London: Henry Colburn, 1840), by the English naval officer and novelist Frederick Chamier (1796-1870):
“If you begin to tell us the history of these yarns, they’ll last for ever, so I’ll have them inspected by my secretary; in the mean time you may make use of every part of you but your eyes; if you tumble overboard, that’s your own work; so away with you on deck, and mind, as sure as God made little apples, if you are detected squinting only out of those hawse holes of yours, your minutes will be shorter than my words.”
5-: From the account of a court case, published in The Morning Herald (London, England) of Wednesday 2nd June 1841:
The Hon. Elliot Thomas Yorke, M.P. for Cambridgeshire, attended at this court yesterday to complain of the conduct of the driver of the hackney cab, 540.
The driver, William Laxton, pleaded not guilty.
The defendant in reply to the charge said, he was called off the rank in Portman-street, Oxford-street, to take up at No. 4, Norfolk-street. The gentleman now present, accompanied by a friend, got into the cab and desired to be driven to Bately’s mews, Belgrave-square, as quickly as possible. Witness did so, and certainly when he was asked what his fare was he did ask 2s, because he had gone at the top of the horse’s speed. He however only took 1s 4d, his bare fare. With respect to not showing his badge, he could only say it was at his breast all the time, and that he never told Mr. Yorke that it was at home. When he asked Mr. Yorke for 2s, that gentleman said to him “Now as sure as God made little apples I’ll summon you; and I’ll summon all of you that charge more than your fare.”
Mr. Yorke denied that he mentioned anything about little apples.
The variant (as) sure as God made (little) green apples is of American-English origin. These are, in chronological order, the earliest occurrences that I have found:
1-: From the Buffalo Evening News (Buffalo, New York) of Friday 27th January 1893:
Rochester, Jan. 27.—Monroe county’s new District Attorney had no sooner taken his seat than he announced his intention of following up every coal baron in that county if somebody would only make a complaint. He said at that time “I have one of them within my reach and will yank him here as surely as God made green apples.” True to his promise, he has yanked.
2-: From an article about the overproduction of prunes in Oregon, published in the Morning Oregonian (Portland, Oregon) of Saturday 5th December 1903:
“What would I do if I had 100 cartloads?” [responded?] Ed Lang, of Lang & Co. “Sir, I wouldn’t have 100 cartloads; no, nor 50 cartloads, and if I had ten cartloads, I’d get rid of them. The Willamette Valley Association will carry over a large stock [illegible] as sure as God made green apples.”
3-: From the account of a meeting of the citizens of Tampa, which adopted a resolution calling on legislators to pass the bill annexing to the city of Tampa the town of Fort Brooke—account published in the Tampa Morning Tribune (Tampa, Florida) of Saturday 18th May 1907:
ROUSING MEETING FOR GREATER TAMPA HELD LAST NIGHT IN THE COURT HOUSE; 500 IN ATTENDANCE
DR. GOLDSTEIN DECLARES TAMPA WILL BE GREAT “AS SURE AS GOD MADE GREEN APPLES.”
In the same issue of the Tampa Morning Tribune, Dr. Goldstein was quoted as declaring:
I believe that Tampa will be a great city, just as surely as I know that God made green apples.
4-: From The Tacoma Daily Ledger (Tacoma, Washington) of Friday 20th March 1908:
In the big seventh precinct of the Fourth ward—that newly annexed part of the city which in the primary election went so overwhelmingly republican and so solidly for Judge John W. Linck—as enthusiastic a rally was held last night by the republican candidates as ever took place in Tacoma.
A significant feature of the meeting was an able, unexpected address by George Russell, old line democrat, a former supporter of Mayor Wright and the city hall ring, urging the election of Judge Linck as mayor. […]
“I believe Judge Linck will be elected our mayor for the next four, not two years,” Mr. Russell asserted. “I hope you will all get out and vote and work for him. I voted for Wright four years ago; two years ago I was on my little old horse ranch across the mountains and could not vote. I will probably vote for Bryan this fall. But in this campaign politics ought not to be of much consequence. Linck ought to be mayor. And as sure as God made little green apples grow, he will be mayor. I voted wrong before and I see it. But I’m going to vote right this time. (Voice: “And there are lots of others with you.”)
5-: From The Argos Reflector (Argos, Indiana) of Thursday 18th February 1909:
Incorrigible at Eleven
The Starke County Republican records the fact that Sheriff Doyle of Starke county took Lee Straley aged 11, the incorrigible son of Louis Straley and wife of Round Lake to the Boy’s Reformatory at Plainfield last week. The court was asked (presumably by the parents) to sentence him in the hope that he might be made to see the error of his ways. Webster says that incorrigible means one who is incapable of being corrected or a hardened criminal. Fancy a boy of eleven years who those words could be spoken of. Does this story redound any credit to the parents? Almost as sure as God made little green apples this young man will graduate from Plainfield some day into the Jeffersonville Reformatory in much the same manner as the big majority of Reformed “hardened criminals” from Plainfield do.